3.2737 \(\int \frac{1}{x (a+b x^{-n})} \, dx\)

Optimal. Leaf size=15 \[ \frac{\log \left (a x^n+b\right )}{a n} \]

[Out]

Log[b + a*x^n]/(a*n)

________________________________________________________________________________________

Rubi [A]  time = 0.0077497, antiderivative size = 15, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 15, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.133, Rules used = {263, 260} \[ \frac{\log \left (a x^n+b\right )}{a n} \]

Antiderivative was successfully verified.

[In]

Int[1/(x*(a + b/x^n)),x]

[Out]

Log[b + a*x^n]/(a*n)

Rule 263

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Int[x^(m + n*p)*(b + a/x^n)^p, x] /; FreeQ[{a, b, m
, n}, x] && IntegerQ[p] && NegQ[n]

Rule 260

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rubi steps

\begin{align*} \int \frac{1}{x \left (a+b x^{-n}\right )} \, dx &=\int \frac{x^{-1+n}}{b+a x^n} \, dx\\ &=\frac{\log \left (b+a x^n\right )}{a n}\\ \end{align*}

Mathematica [A]  time = 0.004008, size = 15, normalized size = 1. \[ \frac{\log \left (a x^n+b\right )}{a n} \]

Antiderivative was successfully verified.

[In]

Integrate[1/(x*(a + b/x^n)),x]

[Out]

Log[b + a*x^n]/(a*n)

________________________________________________________________________________________

Maple [A]  time = 0.002, size = 16, normalized size = 1.1 \begin{align*}{\frac{\ln \left ( b+a{x}^{n} \right ) }{an}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/x/(a+b/(x^n)),x)

[Out]

ln(b+a*x^n)/a/n

________________________________________________________________________________________

Maxima [B]  time = 0.977192, size = 43, normalized size = 2.87 \begin{align*} \frac{\log \left (a + \frac{b}{x^{n}}\right )}{a n} - \frac{\log \left (\frac{1}{x^{n}}\right )}{a n} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/x/(a+b/(x^n)),x, algorithm="maxima")

[Out]

log(a + b/x^n)/(a*n) - log(1/(x^n))/(a*n)

________________________________________________________________________________________

Fricas [A]  time = 1.27793, size = 30, normalized size = 2. \begin{align*} \frac{\log \left (a x^{n} + b\right )}{a n} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/x/(a+b/(x^n)),x, algorithm="fricas")

[Out]

log(a*x^n + b)/(a*n)

________________________________________________________________________________________

Sympy [A]  time = 0.692164, size = 39, normalized size = 2.6 \begin{align*} \begin{cases} \tilde{\infty } \log{\left (x \right )} & \text{for}\: a = 0 \wedge b = 0 \wedge n = 0 \\\frac{x^{n}}{b n} & \text{for}\: a = 0 \\\frac{\log{\left (x \right )}}{a + b} & \text{for}\: n = 0 \\\frac{\log{\left (x \right )}}{a} & \text{for}\: b = 0 \\\frac{\log{\left (x \right )}}{a} + \frac{\log{\left (\frac{a}{b} + x^{- n} \right )}}{a n} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/x/(a+b/(x**n)),x)

[Out]

Piecewise((zoo*log(x), Eq(a, 0) & Eq(b, 0) & Eq(n, 0)), (x**n/(b*n), Eq(a, 0)), (log(x)/(a + b), Eq(n, 0)), (l
og(x)/a, Eq(b, 0)), (log(x)/a + log(a/b + x**(-n))/(a*n), True))

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{1}{{\left (a + \frac{b}{x^{n}}\right )} x}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/x/(a+b/(x^n)),x, algorithm="giac")

[Out]

integrate(1/((a + b/x^n)*x), x)